#! /usr/bin/env zx
import rimraf from 'rimraf'
import glob from 'glob'

// 要删除的文件夹的通配符模式

function clean() {
  const pattern = '**/node_modules'
  const matches = glob.sync(pattern)
  matches.forEach((match) => {
    rimraf.sync(match)
  })
}

clean()
